package com.medical.manage.es;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.rely.FieldType;
import org.dromara.easyes.annotation.rely.IdType;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@IndexName("advice111")
public class AdviceEs {
    //病友圈建议id
    @IndexId(type = IdType.CUSTOMIZE)
    private Integer adviceId;
    //用户id
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer userId;
    //建议内容
    @IndexField(fieldType = FieldType.TEXT)
    private String content;
    //支持数量
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer supportNum;
    //反对数量
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer oppositionNum;
    //创建时间
    @IndexField(fieldType = FieldType.TEXT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    //创建人
    @IndexField(fieldType = FieldType.TEXT)
    private String createPerson;
    //修改人
    @IndexField(fieldType = FieldType.TEXT)
    private String updatePerson;
}
